<div class="form_item form_item_image form_item_image_single" id="img_selector_!{$item.id}">
	<strong>!{if $item.required eq true}<span class="red">*</span>!{/if}!{$item.name}：</strong>
	<div class="picture_selector">
		!{if $item.value}
		<img class="auto_img" alt="" src="!{res file=!{$item.value} thumb='64x64'}"/>
		!{else}
		<img class="auto_img" alt="没有图片" src="!{res file='images/no_pic.jpg' thumb='64x64'}"/>
		!{/if}
		<input type="button" class="button img_selector_btn" id="img_selector_!{$item.id}" value="设置图片"/>
		<input type="hidden" name="!{$item.id}" value="!{res file=!{$item.value}}"/>
	</div>
	<p>!{$item.desc}</p>
</div>
<script>
	$(function(){
		$("#img_selector_!{$item.id} .img_selector_btn").picture_selector({multiple:false, on_select:function(imgs){
			var src = imgs[0].src;
			src = src.replace(/(\/\d+x\d+\/)/img, "/64x64/");
			$('#img_selector_!{$item.id} .auto_img').attr({'src':src,'alt':'','style':''}).auto_img();
			$('#img_selector_!{$item.id} input[name="!{$item.id}"]').val(src);
		}});
	});
</script>